import "@/amtf/css/rainbow.css"

import { Quasar } from 'quasar'
import '@quasar/extras/material-icons/material-icons.css'
import 'quasar/src/css/index.sass'

import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import router from '@/amtf/router/index'
import '@/amtf/router/permission'
import { store } from '@/amtf/stores'
import auth from '@/amtf/directive/auth'

import svgIcon from '@/amtf/components/svgIcon/svgIcon.vue'
import a_page from '@/amtf/components/a_page.vue';
import a工具栏 from '@/amtf/components/a工具栏.vue';
import a页头固定栏 from '@/amtf/components/a页头固定栏.vue';
import a数组 from '@/amtf/components/a数组.vue';
import a看板 from '@/amtf/components/a看板/a看板.vue';
import config from './config';
export default {
  // install: (app, ...options) => {
  // console.log(`options 👉`, options)
  install: (app, cfg) => {
    // console.log(`cfg 👉`,cfg)
    app.use(router)
    .use(store)
    .use(auth)

    app.use(Quasar, {
      plugins: {}, // import Quasar plugins and add here
    })

    app.config.globalProperties.$a_config = config

    // 注册全部el-icon图标
    for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
      // console.log(`key 👉`,key)
      // console.log(`component 👉`,component)
      app.component(key, component)
    }

    app.component('SvgIcon', svgIcon)
    app.component('a_page', a_page)
    app.component('a工具栏', a工具栏)
    app.component('a页头固定栏', a页头固定栏)
    app.component('a数组', a数组)
    app.component('a看板', a看板)

  }
}
